package logic

import (
	"context"
	"user_srv/internal/dao"
	"user_srv/internal/svc"
	"user_srv/user"

	"github.com/zeromicro/go-zero/core/logx"
)

type MemberStatusUpdateLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewMemberStatusUpdateLogic(ctx context.Context, svcCtx *svc.ServiceContext) *MemberStatusUpdateLogic {
	return &MemberStatusUpdateLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

func (l *MemberStatusUpdateLogic) MemberStatusUpdate(in *user.MemberStatusUpdateRequest) (*user.MemberStatusUpdateResponse, error) {
	dao.MemberStatusUpdate(in.OrderSn, in.Status) // 会员续费回调
	return &user.MemberStatusUpdateResponse{}, nil
}
